package com.util.concurrent.atomic;

import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author 宫静雨
 * @version 1.0
 * @since 2023-07-25 14:43:02
 */
@Data
public class Atomic implements Serializable {

    public volatile int f1;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Atomic atomic = (Atomic) o;
        return f1 == atomic.f1;
    }

    @Override
    public int hashCode() {
        return Objects.hash(f1);
    }
}
